<?php
namespace Model;
use Kuyuan\WqCore\Model\Model;
class StaffModel extends Model
{
    protected $_fields = array(
        "id",
        "uniacid",
        "uid",
        "boss",
        "status",
        "time"
    );

    // ---get---

    /**
     * 员工用户信息
     * @param $_value
     * @param $_data
     * @return
     */
    public function getUserAttr($_value,$_data)
    {
        if(isset($_data["uid"])) {
            return W7McMembersModel::where("uid",$_data["uid"])
                ->field(array("nickname","avatar"))
                ->cache(!KUYUAN_DEBUG)
                ->find();
        }
    }

}